package com.leinao.file.dto;


import java.io.Serializable;

import org.springframework.web.multipart.MultipartFile;

/**
 * 
 * 大文件上传参数
 * @author  wangshoufa 
 * @date 2018年11月12日 上午10:47:59
 *
 */
public class MultipartFileParam implements Serializable {

	private static final long serialVersionUID = -5906804044344334025L;
	
    // 用户id
    private String userId;
    
    private String dir;
    
    //任务ID
    private String taskId;
    //总分片数量
    private Integer chunks;
    //当前为第几块分片
    private Integer chunk;
    //当前分片大小
    private Long size = 0L;
    //文件名
    private MultipartFile file;
    // MD5
    private String md5;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public String getDir() {
		return dir;
	}

	public void setDir(String dir) {
		this.dir = dir;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public Integer getChunks() {
        return chunks;
    }

    public void setChunks(Integer chunks) {
        this.chunks = chunks;
    }

    public Integer getChunk() {
        return chunk;
    }

    public void setChunk(Integer chunk) {
        this.chunk = chunk;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

	public MultipartFile getFile() {
        return file;
    }

    public void setFile(MultipartFile file) {
        this.file = file;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    @Override
    public String toString() {
        return "MultipartFileParam{" +
                "userId='" + userId + '\'' +
                ", taskId='" + taskId + '\'' +
                ", chunks=" + chunks +
                ", chunk=" + chunk +
                ", size=" + size +
                //", fileName='" + fileName + '\'' +
                ", file=" + file +
                ", md5='" + md5 + '\'' +
                '}';
    }
}
